Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefix config #553

Merged
merged 4 commits into from
Nov 14, 2023
Merged

Prefix config #553

merged 4 commits into from
Nov 14, 2023

Conversation

gthea
Copy link
Contributor

@gthea gthea commented Nov 13, 2023

Android SDK

What did you accomplish?

  • Add prefix config value
  • Use prefix to generate DB name

@gthea gthea self-assigned this Nov 13, 2023
@gthea gthea marked this pull request as ready for review November 14, 2023 14:12
@gthea gthea requested a review from a team as a code owner November 14, 2023 14:12
* @return This builder
*/
public Builder prefix(String prefix) {
mPrefix = (prefix == null) ? "" : prefix.trim();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBD: validation

Copy link
Contributor

@javrudsky javrudsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Don't forget prefix validation / sanitization

@@ -99,13 +99,20 @@ String getDatabaseName(SplitClientConfig config, String apiToken, Context contex
}

private String buildDatabaseName(SplitClientConfig config, String apiToken) {
int apiTokenLength = apiToken.length();
if (apiToken == null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the SDK keys is validated previously in Input Validation somewhere, so this check wouldn't be necessary.

@gthea gthea merged commit 3a15b21 into prefix Nov 14, 2023
5 checks passed
@gthea gthea deleted the prefix_SDKS-7761_1 branch November 14, 2023 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants